|
|
@@ -9,6 +9,8 @@ import android.os.Bundle;
|
9
|
9
|
import android.os.IBinder;
|
10
|
10
|
|
11
|
11
|
import com.android.common.executors.ThreadExecutor;
|
|
12
|
+
|
|
13
|
+import ai.pai.client.R;
|
12
|
14
|
import ai.pai.client.utils.HttpPostTask;
|
13
|
15
|
import com.android.common.utils.JSONParseUtils;
|
14
|
16
|
import com.android.common.utils.LogHelper;
|
|
|
@@ -202,6 +204,9 @@ public class GroupService extends Service implements UploadTask.OnPhotoUploadLis
|
202
|
204
|
DBService.getInstance(context).updateCurrentIdByGroupId(groupInfo.groupId,String.valueOf(currentId));
|
203
|
205
|
}
|
204
|
206
|
return true;
|
|
207
|
+ }else if(status==402002){
|
|
208
|
+ msg = getString(R.string.group_is_locked);
|
|
209
|
+ return false;
|
205
|
210
|
}
|
206
|
211
|
}catch (Exception e){
|
207
|
212
|
LogHelper.e(TAG,"group service doJoinGuideGroupTask error happen "+e);
|
|
|
@@ -270,31 +275,10 @@ public class GroupService extends Service implements UploadTask.OnPhotoUploadLis
|
270
|
275
|
groupInfo.groupName = group.getString("group_name");
|
271
|
276
|
groupInfo.createTime = group.getString("created_at");
|
272
|
277
|
groupInfo.groupFrom = group.getInt("group_from");
|
273
|
|
-// if(data.has("photos")){
|
274
|
|
-// JSONArray sessionArray = data.getJSONArray("photos");
|
275
|
|
-// if(sessionArray!=null && sessionArray.length()>0) {
|
276
|
|
-// photoList = new ArrayList<>();
|
277
|
|
-// for(int k = 0; k<sessionArray.length();k++){
|
278
|
|
-// JSONObject sessionObj = sessionArray.getJSONObject(k);
|
279
|
|
-// String sessionId = sessionObj.getString("session_id");
|
280
|
|
-// JSONArray photoArray = sessionObj.getJSONArray("photos");
|
281
|
|
-// if(photoArray!=null && photoArray.length()>0){
|
282
|
|
-// for(int m = 0; m<photoArray.length();m++){
|
283
|
|
-// JSONObject photoObj = photoArray.getJSONObject(m);
|
284
|
|
-// GroupPhotoItem groupPhotoItem = GroupPhotoItem.parseFromJSON(photoObj);
|
285
|
|
-// groupPhotoItem.sessionId = sessionId;
|
286
|
|
-// photoList.add(groupPhotoItem);
|
287
|
|
-// }
|
288
|
|
-// }
|
289
|
|
-// }
|
290
|
|
-// LogHelper.d(TAG,"group service doJoinGroupTask get new photos ,count="+photoList.size());
|
291
|
|
-// DBService.getInstance(context).addGroupPhotoList(photoList);
|
292
|
|
-// }
|
293
|
|
-//
|
294
|
|
-// int currentId = data.getInt("current_id");
|
295
|
|
-// DBService.getInstance(context).updateCurrentIdByGroupId(groupInfo.groupId,String.valueOf(currentId));
|
296
|
|
-// }
|
297
|
278
|
return true;
|
|
279
|
+ }else if(status==402002){
|
|
280
|
+ msg = getString(R.string.group_is_locked);
|
|
281
|
+ return false;
|
298
|
282
|
}
|
299
|
283
|
}catch (Exception e){
|
300
|
284
|
LogHelper.e(TAG,"group service doJoinGroupTask error happen "+e);
|